<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  
<%
String path = request.getContextPath(); 
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>"> 
<meta charset="UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="css/edittable.css"  ></link>  
<link rel="stylesheet" type="text/css" href="css/validate.css"  ></link>  
<script type="text/javascript"  src="js/jquery-1.8.0.js"></script>
<script type="text/javascript">
$(function() {
	$("#submit").click(function () {
		$.ajax({
			 url:"AdminServlet.do",
			 type:"POST",
			 data:{flag:"update",id:'${admin.id}',adminName:$("#adminName").val(),note:$("#note").val()},
			 success:function(data){
				 $("#result_msg").html(data);
			 } 
		 }); 
	});
})

</script>
</head>
<body>
<div class ="div_title">
	 <div class="div_titlename"> <img src="images/san_jiao.gif" ><span>用户修改</span></div>
</div>

	<table class="edit_table" >
		 		<tr>
		 			 	<td class="td_info">用户账号:</td>	
		 			 	<td class="td_input_short"> 
		 			 		<input type="text" class="txtbox" id="adminName" 
								value="${admin.adminName}"
		 			 		name="adminName" onfocus="showInfo('不能为空',this)"
                       onblur="validateUserName(this)"/> 
		 			 	</td>   
		 			 	<td>
		 			 		<label class="validate_info" id="adminName_msg">4-15位；只限数字(0-9)和英文(a-z),不区分大小写</label>
		 			 	</td> 
		 		</tr>
		 		<tr>
		 			<td class="td_info">备注信息:</td>	
		 			<td><textarea rows="4" cols="27" name="note" class="txtarea" id="note">${admin.note}</textarea> </td>	
		 			<td><label></label></td>	
		 		</tr>
		 		<tr>
		 			<td class="td_info"> </td>	
		 			<td> 
		 			<input class="form_btn" type="button" value="修改" id="submit"/> 
		 			<input type="button" onclick="self.location=document.referrer;" class="form_btn" value="返回" /> </td>
		 			<td>
		 				<label id="result_msg" class="result_msg"></label>
		 			</td>	
		 		</tr>
		</table>
<script type="text/javascript" src="js/regin.js"></script>
</body>
</html>